package Utilitaires;

import ManagedBeans.UsersBean;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;  
import java.io.InputStream;  
import java.util.Properties;  
import java.util.logging.Level;
import java.util.logging.Logger;
  
/** 
 * Simple class meant to read a properties file 
 *  
 * @author Ta mère
 *  
 */  
public class PropertiesReader {  
  
    /** 
     * Default Constructor 
     *  
     */  
    public PropertiesReader() {  
  
    }  
  
    /** 
     * Some Method 
     *  
     * @throws IOException 
     *  
     */  
    public static Properties getProperties() {          

            Properties properties = new Properties();
            
            PropertiesReader reader = new PropertiesReader();
            
            try 
            {
                properties.load(new FileInputStream("myApp.properties"));

                return properties;
                
            } 
            catch (Exception ex) 
            {
                Logger.getLogger(PropertiesReader.class.getName()).log(Level.SEVERE, null, ex);
            }
        
        return null;
    }  
  
} 